<!DOCTYPE html>

<html lang="en">
<%@page import="karaokestrong.modelo.Persona"%>
<%@page import="karaokestrong.modelo.Local"%>
<%@page import="karaokestrong.modelo.Administrador"%>
<%@page import="karaokestrong.negocio.GestionLocal,java.util.*"%>
<%@page import="karaokestrong.negocio.GestionCliente"%>
<%@ page contentType="text/html; charset=utf-8" language="java"
	import="java.sql.*" errorPage=""%>
<%@page import="java.util.Collection"%>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<title>Karaoke Strong</title>

<script src="js/jquery-1.10.2.js"></script>
<script src="js/jquery-ui-1.10.3.js"></script>
<script src="js/bootstrap.js"></script>

<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="css/bootswatch.css" rel="stylesheet">
<link href="css/jquery-ui-1.10.3.css" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

</head>
<body class="preview">

	<%
		GestionLocal neg = new GestionLocal();

		Collection<Local> todos = neg.ListarLocalesTodos();

		request.setAttribute("ListadoLocal", todos);
	%>

	<%
		GestionCliente adm = new GestionCliente();
		Collection<Administrador> todos2 = adm.ListarAdmins();
		request.setAttribute("ListadoAdministrador", todos2);
	%>


	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a> <a class="brand" href="index.jsp">Sistema de Karaoke Strong</a>
				<div class="nav-collapse collapse">
					<ul class="nav">
						<li class="active"><a href="#">Bienvenidos</a></li>
						<li><a href="#about">Acerca</a></li>
						<li><a href="#contact">Contactanos</a></li>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown">Mantenimiento <b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="formlocal.jsp">Mantenimiento Local</a></li>
								<li><a href="#">Mantenimiento Salas</a></li>
								<li><a href="#">Mantenimiento Productos</a></li>
								<li class="divider"></li>
								<li class="nav-header">Nav header</li>
								<li><a href="#">Separated link</a></li>
								<li><a href="#">One more separated link</a></li>
							</ul></li>
					</ul>
					<form class="navbar-form pull-right">
						<input class="span2" type="text" placeholder="Email"> <input
							class="span2" type="password" placeholder="Password">
						<button type="submit" class="btn">Sign in</button>
					</form>
				</div>
				<!--/.nav-collapse -->
			</div>
		</div>
	</div>

	<div class="container">

		<!-- Main hero unit for a primary marketing message or call to action -->
		<div class="hero-unit">
			<h1>Administrar Local</h1>

			<form id="formLocal" name="local" action="ServletLocalActualizar"
				method="post" class="form-horizontal well">


				<fieldset>
					<legend>Formulario Actualizar Local</legend>
					<div class="form-actions">
						<ul class="nav nav-tabs">
							<li><a href="formlistarlocal.jsp">Listar</a></li>
							<li><a href="formlocalmostrar.jsp">Buscar</a></li>
							<li><a href="formlocalactualizar.jsp">Actualizar</a></li>
							<li><a href="formlocaleliminar.jsp">Eliminar</a></li>
						</ul>
					</div>


					<div class="control-group">
						<label class="control-label" for="select01">Id Local :</label>
						<div class="controls">
							<select name="txtId" id="txtId">
								<option value="0">Seleccione</option>
								<%
									for (Local c : todos) {
										out.println("<option value=" + c.getIdlocal() + ">"
												+ c.getNombre() + "</option>");
									}
								%>
							</select>
						</div>
					</div>


					<div class="control-group">
						<label class="control-label" for="input01">Nombres:</label>
						<div class="controls">
							<input name="txtNombre" type="text" class="input-medium"
								id="txtNombre" required="required">
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="input01">Direcci&oacute;n:</label>
						<div class="controls">
							<input name="txtDireccion" type="text" class="input-medium"
								id="txtDireccion" required="required">
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="input01">Tel&eacute;fono:</label>
						<div class="controls">
							<input id="txtTelefono" name="txtTelefono" type="tel"
								maxlength="9" class="input-medium" required="required">
						</div>
					</div>


					<div class="control-group">
						<label class="control-label" for="input01">Correo:</label>
						<div class="controls">
							<input id="txtCorreo" name="txtCorreo" type="email"
								class="input-medium" required="required"
								placeholder="Ingrese el correo aqu&iacute;">
						</div>
					</div>


					<div class="control-group">
						<label class="control-label" for="textarea">Descripcion:</label>
						<div class="controls">
							<textarea name="txtDescripcion" class="input-xlarge"
								onkeypress="return isNumberKey(event)" id="descripcion" rows="3"
								required="required"></textarea>
						</div>
					</div>


					<div class="control-group">
						<label class="control-label" for="select01"> Administrador :</label>
						<div class="controls">
							<select name="txtAdmin" id="txtAdmin">
								<option value="0">Seleccione</option>
								<%
									for (Administrador c : todos2) {
										out.println("<option value=" + c.getIdadministrador() + ">"+ c.getNombres() + " " + c.getPaterno() + " " + c.getMaterno() + "</option>");
									}
								%>
							</select>
						</div>
					</div>





					<div class="form-actions">
						<button type="submit" name="Submit" class="btn btn-primary">Actualizar</button>
						<button type="reset" class="btn">Cancelar</button>
					</div>

				</fieldset>
			</form>
		</div>



		<footer>
			<p>&copy; Desarrollo Web 2013</p>
		</footer>

	</div>
	<!-- /container -->

</body>
</html>